package com.ssy.bus.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author ssy
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("bus_purchase")
public class Purchase implements Serializable {

    private static final long serialVersionUID = 2466809291885639508L;

    private String id;

    private Integer supplierId;

    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal price;

    /**
     * 1 入库成功
     * 2 待审核
     * 3 审核中
     * 4 审核通过
     * 5 审核不通过
     * 6 作废
     */
    private Integer state;

    private String applicant;

    private String operation;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date wareTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String supplierName;


}
